package com.free.utils.enums;

public enum ENUM_APP_TYPE {

    AppChannel(1,"APP"),MicroMessanger(3,"micromessenger"),PcBrowser(2,"browser");

    private Integer key;

    private String name;

    ENUM_APP_TYPE(Integer key, String name)
    {
        this.key = key;
        this.name = name;
    }

    public ENUM_APP_TYPE getByKey(Integer key)
    {
        for(ENUM_APP_TYPE enst : ENUM_APP_TYPE.values())
        {
            if(enst.getKey() == key){
                return enst;
            }
        }
        return null;
    }

    public boolean isEqual(Integer key)
    {
        return this.key == key;
    }

    /**
     * @return the key
     */
    public Integer getKey()
    {
        return key;
    }

    /**
     * @param key the key to set
     */
    public void setKey(Integer key)
    {
        this.key = key;
    }

    /**
     * @return the name
     */
    public String getName()
    {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name)
    {
        this.name = name;
    }

}
